# Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
# Contributor: Jan de Groot <jgc@archlinux.org>

pkgname=libgepub
pkgver=0.7.0
pkgrel=1
pkgdesc="Simple library to read epub files using glib"
url="https://gitlab.gnome.org/GNOME/libgepub"
arch=(x86_64)
license=(LGPL)
depends=(glib2 libsoup3 libxml2 libarchive webkit2gtk-4.1)
makedepends=(git gobject-introspection meson)
provides=(libgepub-${pkgver%.*}.so)
options=(debug)
_commit=4dd9e801cd8dbb33e62ce998df45e10fd6d215fe  # tags/0.7.0^0
source=("git+https://gitlab.gnome.org/GNOME/libgepub.git#commit=$_commit")
sha256sums=('SKIP')

pkgver() {
  cd libgepub
  git describe --tags | sed 's/[^-]*-g/r&/;s/-/+/g'
}

prepare() {
  cd libgepub
}

build() {
  arch-meson libgepub build
  ninja -C build
}

check() {
  meson test -C build --print-errorlogs
}

package() {
  meson install -C build --destdir "$pkgdir"
}

# vim:set sw=2 sts=-1 et:
